home *** CD-ROM | disk | FTP | other *** search
- class Escalator extends MovieClip
- {
- var direction;
- var x;
- var interval_id = 0;
- function Escalator()
- {
- super();
- }
- function init(direction)
- {
- this.direction = direction;
- this.x = this._x;
- if(this.direction < 0)
- {
- this._name = "UpEscalator" + _global.MallCrawl.upEscalators.length;
- _global.MallCrawl.upEscalators.push(this);
- _global.BigKid.available_to_hit = false;
- }
- else
- {
- this._name = "DownEscalator" + _global.MallCrawl.downEscalators.length;
- _global.MallCrawl.downEscalators.push(this);
- _global.BigKid.available_to_hit = false;
- }
- }
- function activate(mc)
- {
- if(this.direction < 0)
- {
- mc.glevel += 1;
- }
- else
- {
- mc.glevel -= 1;
- }
- mc.interval_id = setInterval(mc,"escalate",10,this);
- }
- }
-